/*
package NiuKe;

import java.util.Scanner;

*/
/**
 * @Description:
 * @Author: Hanzao
 * @Date: 2022/06/17/10:29
 *//*

public class HJ73 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        int month = scanner.nextInt();
        int day = scanner.nextInt();
        boolean tmp = false;
        if (year % 4 == 0 && year % 100 != 0) {
            tmp = true;
        }
        int[] arr = {31,28,31,30,31,30,31,31,30,31,30,31};
        if(tmp == true){
            arr[1] = 29;
        }
        int res = 0;
        for(int i=0;i<month-1;i++){
            res += arr[i];
        }
        res+=day;
        System.out.println(res);
    }
}
*/
